message(STATUS "test CMAKE_CXX_FLAGS  " ${CMAKE_CXX_FLAGS})

include_directories(${PROJECT_SOURCE_DIR}/src/)
include_directories(${PROJECT_SOURCE_DIR}/src/database/odbc)

LINK_DIRECTORIES($ENV{INFORMIX_CSDK_LIB})
LINK_DIRECTORIES($ENV{INFORMIX_CSDK_LIB}/c++)
LINK_DIRECTORIES($ENV{INFORMIX_CSDK_LIB}/cpp)
LINK_DIRECTORIES($ENV{INFORMIX_CSDK_LIB}/dmi)
LINK_DIRECTORIES($ENV{INFORMIX_CSDK_LIB}/esql)
LINK_DIRECTORIES($ENV{MYSQL_CSDK_LIB})
LINK_DIRECTORIES($ENV{PQXX_LIB})

LINK_DIRECTORIES(/usr/lib64/mysql)
LINK_DIRECTORIES(/usr/lib/oracle/21/client64/lib)

LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib)

set(EXECUTABLE_OUTPUT_PATH ${EXECUTABLE_INSTALL_PATH}/test)

add_executable(topdbs_base_test topdbs_base_test.cpp )
target_link_libraries(topdbs_base_test topdbs)

add_executable(format_placeholders_test format_placeholders_test.cpp )
target_link_libraries(format_placeholders_test topdbs)

add_executable(topdbs_field_test topdbs_field_test.cpp )
target_link_libraries(topdbs_field_test topdbs)

add_executable(topdbs_connection_inst_test topdbs_connection_inst_test.cpp )
target_link_libraries(topdbs_connection_inst_test topdbs)

add_executable(topdbs_connection_pool_test topdbs_connection_pool_test.cpp )
target_link_libraries(topdbs_connection_pool_test topdbs)

add_executable(topdbs_convert_test topdbs_convert_test.cpp )
target_link_libraries(topdbs_convert_test topdbs)

if(ENABLE_USE_ODBC)
add_executable(topdbs_odbc_test topdbs_odbc_test.cpp )
target_link_libraries(topdbs_odbc_test topdbs )
endif()

add_executable(topdbs_dbsfile_test topdbs_dbsfile_test.cpp )
target_link_libraries(topdbs_dbsfile_test topdbs)

add_executable(topdbs_c_api_test topdbs_c_api_test.c )
target_link_libraries(topdbs_c_api_test topdbs)